package com.efounder.common.floatwindow;

import android.content.Context;
import android.view.View;

import com.efounder.mobilecomps.R;

/**
 * @autor yqs
 * @date 2019/5/14 10:07
 **/
public class ImageFloatView extends androidx.appcompat.widget.AppCompatImageView implements IFloatView {
    private Context mContext;
    private int xOffset;
    private int yOffset;

    public ImageFloatView(Context context) {
        super(context);
        this.mContext = context;

        initView();
    }

    private void initView() {
        setImageDrawable(getResources().getDrawable(R.drawable.ic_launcher));
    }


    @Override
    public View getView() {
        return this;
    }

//    @Override
//    public int getGravity() {
//        return Gravity.RIGHT | Gravity.CENTER_VERTICAL;
//    }

    @Override
    public int getXoffset() {
        return xOffset;
    }

    @Override
    public int getYoffset() {
        return yOffset;
    }

    @Override
    public void setXoffset(int xoffset) {
        xOffset = xoffset;
    }

    @Override
    public void setYoffset(int yoffset) {
        yOffset = yoffset;
    }

    @Override
    public int getMoveType() {
        return MoveType.slide;
    }
}
